/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package view;

import Model.Aluno;
import Model.AlunoDAO;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import org.hibernate.bytecode.buildtime.ExecutionException;

/**
 *
 * @author GIOVANI
 */
class TelaAluno {
    
   private AlunoDAO dao = new AlunoDAO();
   
    Node criaMenu(final AlunoAba aba) {
        ToolBar barra = new ToolBar();
        HBox h_barra = new HBox();
         
        Button cadastraAluno = new Button("Incluir");
        Button consultaAluno = new Button("Pesquisar");
                      
        //eventos
       cadastraAluno.setOnAction(new EventHandler<ActionEvent>(){
            
        @Override
        public void handle(ActionEvent t){
                aba.montaCentro_formulario();
        }
    
    

        });
       //pesquisa
       consultaAluno.setOnAction(new EventHandler<ActionEvent>(){
            
        @Override
        public void handle(ActionEvent t){
                aba.montaCentro_consulta();
            }
        });
       
        
        //barra de menu
        barra.getItems().add(cadastraAluno);
        barra.getItems().add(consultaAluno);
        barra.setMinHeight(30);
        barra.setMinWidth(800);
        h_barra.getChildren().add(barra);
        
        return h_barra;
    }

        

   //CONSULTA
    

}
